package com.example.ifopt;

import org.junit.Test;

import java.util.Map;
import java.util.Optional;

/**
 *
 *
 * @author qingyan 2022-03-11
 */
public class IfOptimization {
    @Test
   public void test(){
        Map<String, Object> map = null;
        System.out.println(Optional.ofNullable(map.get("123")).orElse(1));
    }



}
